From d086c32a4ac19333a9f2470454e624b3cffbefe7 Mon Sep 17 00:00:00 2001 From: "kaf24@localhost.localdomain" Date: Sat, 12 Aug 2006 15:56:00 +0100 Subject: [PATCH] [NET] front: Restore 16 bytes of reservation By replacing dev_alloc_skb with alloc_skb we need to do the 16-byte reservation ourselves. Also, it's unnecessary to align the size when calling alloc_skb since the alignment is an implementation detail of alloc_skb and it already takes care of it for us. Signed-off-by: Herbert Xu --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index 1556d2299c..ef6e134a7d 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -615,7 +615,7 @@ static void network_alloc_rx_buffers(struct net_device *dev) * necessary here. * 16 bytes added as necessary headroom for netif_receive_skb. */ - skb = alloc_skb(SKB_DATA_ALIGN(RX_COPY_THRESHOLD + 16), + skb = alloc_skb(RX_COPY_THRESHOLD + 16, GFP_ATOMIC | __GFP_NOWARN); if (unlikely(!skb)) goto no_skb; @@ -633,6 +633,7 @@ no_skb: break; } + skb_reserve(skb, 16); /* mimic dev_alloc_skb() */ skb_shinfo(skb)->frags[0].page = page; skb_shinfo(skb)->nr_frags = 1; __skb_queue_tail(&np->rx_batch, skb); -- 2.30.2